<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

?>

<div class="menu-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'route')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'icon')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'pid')->dropDownList(
        \app\models\Menu::SelectPid(),[
           'value' => $model->pid,
           'prompt' =>['text'=>Yii::t('model-menu','Top Menu'), 'options'=>['value'=>0]],
    ]); ?>

    <div class="form-group">
        <?= Html::submitButton(Yii::t('model-menu', 'Save'), ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
